package com.efeichong.project.domain.vo;

import com.efeichong.common.domain.BaseEntity;
import com.efeichong.mapping.Mapping;
import com.efeichong.mapping.UseMode;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.util.List;

/**
 * @author
 * @date 2020/12/06
 * @description
 */
@Setter
@Getter
@ApiModel("部门表")
public class SysDeptVo extends BaseEntity {
    @ApiModelProperty(value = "部门名称")
    private String name;

    @ApiModelProperty(value = "邮箱")
    private String email;

    @ApiModelProperty(value = "联系电话")
    private String phone;

    @ApiModelProperty(value = "显示顺序")
    private Integer sort;

    @Mapping(poProperty = "parent.id")
    @ApiModelProperty(value = "上级id")
    private Long parentId;

    @ApiModelProperty(value = "负责人ids")
    @Mapping(poProperty = "leaders.id")
    private List<Long> leaderIds;

    @ApiModelProperty(value = "负责人")
    @Mapping(poProperty = "leaders", useMode = UseMode.TO_VO)
    private List<SysUserVo> leaderVos;
}
